package com.jintu.portal.repository.mysql.dao;

import com.jintu.portal.repository.mysql.mapper.TempDataMapper;
import com.jintu.portal.pojo.exception.DaoException;
import com.jintu.portal.pojo.submit.OverdueUserInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Repository("tempDataDao")
public class TempDataDao {

    @Resource
    private TempDataMapper tempDataMapper;

    public void insertOverdueData(List<OverdueUserInfo> list) throws DaoException {
        try {
            tempDataMapper.insertOverdueData(list);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            throw new DaoException(e.getMessage());
        }
    }
}
